//- 先去这个pug文件中找
extends shopHead_nav.pug

block append pageStyle
	link(href="${relativePath}/static/css/shopping/shopIndex.css" rel="stylesheet" type="text/css")
	link(href="${relativePath}/static/css/shopping/materFinished.css" rel="stylesheet" type="text/css")
	link(href="${relativePath}/static/css/shopping/service.css" rel="stylesheet" type="text/css")
	link(href="${relativePath}/static/css/shopping/search.css" rel="stylesheet" type="text/css")
	link(href="${relativePath}/static/css/shopping/colleague.css" rel="stylesheet" type="text/css")
	link(href="${relativePath}/static/css/shopping/hot.css" rel="stylesheet" type="text/css")
	link(href="${relativePath}/static/css/shopping/newlist.css" rel="stylesheet" type="text/css")

block matrialContent
	//- 成品材料内容
	div.matrialCon.layout
		div.productsBox
			div.list
				ul
					li
						span.cur 当前位置：
						a(href="javascript:;")
							| 标识汇>
							a(href="./colleague.html") 同行
							| >最新收录
		div.hot-box
			div.hot-list.fl
				div.leftImg.fl
					img(src="${relativePath}/static/imgs/img01.png")
					//- 工商标志
					img.gsicon(src="${relativePath}/static/imgs/gs.png")
				div.right-con.fl
					p.nowrap.com-name 
						| 河南省标识汇科技有限公司
						img(src="${relativePath}/static/imgs/zsr.png")

					div.center.bottomt
						div.litte.nowrap.years.fl
							img(src="${relativePath}/static/imgs/gsh.png")
							|   10年
						div.litte.nowrap.address.fl
							img(src="${relativePath}/static/imgs/po.png")
							|   郑州市高新区
						div.litte.nowrap.advice.fl
							|  中立广告市场
						div.clearfix
					div.center.bottomp
						div.litte.nowrap.phone
							img(src="${relativePath}/static/imgs/phone2.png")  
							|  电话：123456789123456
					div.btm
						a(href="javascript:;") 亚克力板
						a(href="javascript:;") 印刷设计
						a(href="javascript:;") 亚克力板
						a(href="javascript:;") 亚克力板
						a(href="javascript:;") 亚克力板
						a(href="javascript:;") 亚克力板
					//- 定制下单按钮
					a.mized 定制下单
				div.clearfix

		
	//- 成品材料列表模板
	script#newLists(type="text/html")
		| {{set data = data.companys}}
		| {{each data arr}}
		div.hot-list.fl
			div.leftImg.fl
				img(src="{{arr.company_logo}}")
				//- 工商标志
				| {{if arr.auth =='4'}}
				img.gsicon(src="${relativePath}/static/imgs/gs.png")
				| {{/if}}
			div.right-con.fl
				p.nowrap.com-name 
					| {{arr.name}}
					| {{if arr.leaguer_type ==2}}
					img(src="${relativePath}/static/imgs/zsr.png")
					| {{else if arr.leaguer_type ==1}}
					img(src="${relativePath}/static/imgs/zsb.png")
					| {{else if arr.leaguer_type ==3}}
					img(src="${relativePath}/static/imgs/zsy.png")
					| {{/if}}

				div.center.bottomt
					div.litte.nowrap.years.fl
						| {{if arr.auth =='4'}}
						img(src="${relativePath}/static/imgs/gsh.png")
						| {{else}}
						img(src="${relativePath}/static/imgs/gsg.png")
						| {{/if}}
						|   {{arr.year}}年
					div.litte.nowrap.address.fl
						img(src="${relativePath}/static/imgs/po.png")
						|   {{arr.area}}
					div.litte.nowrap.advice.fl
						|  {{arr.ad_market}}
					div.clearfix
				div.center.bottomp
					div.litte.nowrap.phone
						img(src="${relativePath}/static/imgs/phone2.png")  
						|  电话：{{arr.phone}}
				div.btm
					| {{set list = arr.tags}}
					| {{each list tag}}
					a(href="javascript:;") {{tag.name}}
					| {{/each}}
				//- 定制下单按钮
				a.mized 定制下单
			div.clearfix
		| {{/each}}
	//- 分页
	div.pageBox
		nav.pageNav
			div.paginationOne.page

block pageScript

	script.
		$(function(){
			$("#colleague").addClass("active");
			$("#cpcl").click(function(){
				window.location.href='materFinished.html';
			});
			$("#hyfw1").click(function(){
				window.location.href='industryServiceIndex.html';
			});
			$("#index").click(function(){
				window.location.href='materIndex.html';
			});
			
			$(".left span").click(function(){
				$(this).addClass("current").siblings().removeClass("current");
			})
			//- 最新收录列表
			function getNew(pageNum) {
				$.post(shopIp+'/peer/newCompany',{
					userToken:token,
					page:pageNum,
					size:14
				},function(res) {
					var news = res.data
					var newList = template('newLists',res)
					$('.hot-box').append(newList)
					$(".page").html("").pagination({
						pageCount : news.total_page,
						current : pageNum,
						keepShowPN : true,
						count : 2,
						homePage : "1",
						endPage : news.total_page,
						coping : true,
						prevContent : "< 上一页",
						nextContent : "下一页 >",
						callback : function(page) {
							getNew(page.getCurrent());
						}
					});
				})
			}
			getNew()
		});